package com.imu.wys.service.impl;

import com.imu.wys.mapper.ZhSenMapper;
import com.imu.wys.model.ZhSen;
import com.imu.wys.service.ZhSenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ZhSenService")
public class ZhSenServiceImpl implements ZhSenService {
    @Autowired
    ZhSenMapper zhSenMapper;

    @Override
    public ZhSen findByID(int id) {
        return zhSenMapper.findByID(id);
    }

    @Override
    public List<ZhSen> findByParentID(int parentID) {
        return zhSenMapper.findByParentID(parentID);
    }

    @Override
    public ZhSen findSen(int parentID, int senIndex) {
        return zhSenMapper.findSen(parentID,senIndex);
    }

    @Override
    public int insert(ZhSen zhSen) {
        return zhSenMapper.insert(zhSen);
    }
}
